import http from './http.interceptor'
import { FileUpload, FileDownload } from './file.interceptor'
export default {
    install(Vue: any, app: any) {
        // console.log('vm', vm)
        Vue.prototype.$api = {
            // 登录
            login: (data: any) => http.post('/user/list', data),
            // 上传文件
            uploadTest: (data: any, task: Function) => FileUpload.upload(data, task),
            // 下载文件
            downloadTest: (data: any, task: Function) => FileDownload.download(data, task),
        }
    }
}